<?php
class product {
		var $dir_url;
		public function __construct($site){
			$config=Zend_Registry::get('config');
			$this->dir_url=$config->$site->dir_url;
			set_include_path($this->dir_url);
			require 'app/Mage.php';
			Mage::app();
			}
		
		public function getAll(){
			$data=array();
			$product = Mage::getModel('catalog/product');
			$collection  = $product->getCollection()
							->addAttributeToSelect('*');
			if ($collection->getItems()) {
				foreach ($collection->getItems() as $_item) {
				$data[] = $_item->toArray();
			}
			return $data;
			}
		}
		public function toString(){
			return $this->dir_url;
			}
}
?>